package cn.keniykey.mc.landterritory.event;

import javax.annotation.Nullable;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

import cn.keniykey.mc.landterritory.land.api.Land;

public final class PlayerEnterLeaveLandEvent extends Event{
	private static final HandlerList handlers = new HandlerList();
	
	private final Player player;
	private final Land enter,leave;
	
	public PlayerEnterLeaveLandEvent(Player pl,Land en,Land le) {
		super(!Bukkit.isPrimaryThread());
		this.player = pl;
		this.enter = en; 
		this.leave = le;
	}
	
	@Override
	public HandlerList getHandlers() {
		return handlers;
	}
	public static HandlerList getHandlerList() {
		return handlers;
	}
	
	@Nullable
	public Land getEnterLand() {
		return this.enter;
	}
	@Nullable
	public Land getLeaveLand() {
		return this.leave;
	}
	public Player getPlayer() {
		return this.player;
	}
}
